#ifndef _WEAPON_H_
#define _WEAPON_H_

#ifdef _WIN32
#pragma once
#endif

// 05.03.12 - Matthew Brews - Original Creation.

class CWeapon;

#include <string>

#include "entity.h"
#include "movable_entity.h"
#include "timer.h"

using std::string;

class CWeapon : public CMovableEntity
{
public:
    CWeapon(const int nClipSize,
            const string &szWeaponName="weapon_none", 
            const ENTITY_ID &nID=ENT_WEAPON_NONE);
    ~CWeapon();

    virtual bool fire();
    void setWeaponName(string name);
    string getWeaponName() const;
    int getClipCount() const;
    void setClipCount(int nCount);
    int getAmmoCount() const;
    void setAmmoCount(int nCount);


    CTimer getTimeLastFired() const;
    CTimer getTimeNextFire() const;

    void setTimeNextFire(const CTimer &timeFire);
    void setTimeLastFired(const CTimer &timeFire);

    float getWeaponAttackDelay() const;
    void setWeaponAttackDelay(float fWeaponAttackDelay);

private:
    CTimer m_timeLastFired;
    CTimer m_timeNextFire;
    int m_nAmmoCount;
    int m_nClipCount;
    string m_szWeaponName;
    const int m_nClipSize;
    float m_fWeaponAttackDelay;
};

#endif